<%@ page import="com.sg.service.GradeService" %>
<%@ page import="com.sg.pojo.Grade" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>添加新学科</title>
    <%--<meta name="viewport" content="width=device-width, initial-scale=1">--%>
    <%--<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />--%>
    <%--<meta name="keywords" content="Badge Signup Form template Responsive, Login form web template,Flat Pricing tables,Flat Drop downs  Sign up Web Templates, Flat Web Templates, Login sign up Responsive web template, SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, SonyEricsson, Motorola web design" />--%>
    <!-- Custom Theme files -->
    <link href="css/style.css" rel="stylesheet" type="text/css" media="all" />

</head>
<body>
<%

    List<Grade> grades = GradeService.ME.getAll();


%>
<!-- main -->
<div class="w3layouts-main">
    <h1>统计学科信息表</h1>
    <div class="agilesign-form">
        <div class="agileits-top">
            <form action="doAddSubject.jsp" method="post">
                <div class="styled-input w3ls-text">
                    <input type="text" name="sbName" required="" />
                    <label>科目名称</label>
                    <span></span>
                </div>
                <div class="styled-input w3ls-text">
                    <input type="text" name="classHour" required="" pattern="^[1-9][0-9]*$"/>
                    <label>科目时长</label>
                    <span></span>
                </div>
                <div class="styled-input w3ls-text">
                    <select name="gradeId">
                        <%
                            for (Grade grade : grades) {
                        %>
                        <option value="<%=grade.getId()%>"><%=grade.getGname()%></option>
                        <%
                            }
                        %>
                    </select>
                    <label>年级</label>
                    <span></span>
                </div>
                <%--密码
                <div class="styled-input w3ls-text">--%>
                    <%--<input type="password" name="密码" required="">--%>
                    <%--<label>密码</label>--%>
                    <%--<span></span>--%>
                <%--</div>--%>

                <%--<div class="wthree-text">--%>
                    <%--<p>--%>
                        <%--<input type="checkbox" id="brand" value="">--%>
                        <%--<label for="brand"><span></span>同意用户协议</label>--%>
                    <%--</p>--%>
                <%--</div>--%>
                <div class="agileits-bottom">
                    <input type="submit" value="添加">
                </div>
            </form>
        </div>
        <div class="w3agile-btm">
            <%--<p>已经有账号 ? <a href="#"> 登录</a> </p>--%>
            <p>欢迎使用</p>
        </div>
    </div>
</div>
<!-- //main -->
<!-- copyright -->
<!-- <div class="copyright">
    <p>© 2017 Badge Signup Form . All rights reserved | Design by <a href="http://www.bootstrapmb.com/">bootstrapmb</a></p>
</div> -->
<!-- //copyright -->
<%--<form action="doAddSubject.jsp" method="post">--%>

    <%--<p>--%>
        <%--科目名称:<input type="text" name="sbName">--%>
    <%--</p>--%>
    <%--<p>--%>
        <%--科目时长:<input type="text" name="classHour" pattern="^[1-9][0-9]*$">--%>
    <%--</p>--%>
    <%--<p>--%>
        <%--年级编号:--%>
        <%--<select name="gradeId">--%>
            <%--<%--%>
                <%--for (Grade grade : grades) {--%>
            <%--%>--%>
            <%--<option value="<%=grade.getId()%>"><%=grade.getGname()%></option>--%>
            <%--<%--%>
                <%--}--%>
            <%--%>--%>
        <%--</select>--%>
    <%--</p>--%>
    <%--<p>--%>
        <%--<input type="submit" value="添加新课程">--%>
    <%--</p>--%>

<%--</form>--%>
</body>
</html>
